<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;

class CreateAkbusBusAttendanceCollectTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('akbus_bus_attendance_collect', function (Blueprint $table) {
            $table->id();
            $table->tinyInteger('line')->nullable()->comment('线路');
            $table->string('busNumber')->nullable()->comment('车牌号');
            $table->date('signDate')->nullable()->comment('打卡日期');
            $table->string('workHours',50)->default('0')->comment('工作时长');
            $table->string('normalTime')->default('0')->comment('正常班');
            $table->string('overTime')->default('0')->comment('加班');
            $table->string('nightOverTime')->default('0')->comment('晚上加班');
            $table->string('leaveTime')->default('0')->comment('请假');
            $table->string('fixTime')->default('0')->comment('修车');
            $table->string('stopTime')->default('0')->comment('停运');
            $table->string('checkGas')->default('0')->comment('检气瓶');
            $table->tinyInteger('is_del')->default(0)->comment('是否删除 0否 1是');
            $table->timestamps();
        });
        DB::statement("ALTER TABLE akbus_bus_attendance_collect comment '每天车辆考勤汇总'"); //表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('akbus_bus_attendance_collect');
    }
}
